package com.itheima.day05.myfactorial.test3;

public class Test {
    public static void main(String[] args) {
        int result = getProduct(5);
        System.out.println(result);
    }

    public static int getProduct(int i) {
        if (i == 1) {
            return 1;
        } else {
            return i * getProduct(i - 1);
        }
    }
}
